<%@ page language="java" contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<script type="text/javascript">
	$(function() {
		
		$("#file").uploadPreview({ Img: "headImg", Width: 165, Height: 235 });
		
	});		 
</script>
<div id="page-content" class="page-content">
		
	<div class="page-content-wrapper">
				<div class="page-content">
					<!--content-->
					<div class="containerTop">
						<span>修改头像</span>
					</div>
					
					<form id="modifyHeadFrom" class="form-horizontal" role="form" enctype="multipart/form-data">
						<div>
						   <c:if test="${empty userModel.headUrl}">
					          <img id="headImg" src="resources/skins/img/img2.jpg" width="165px" height="235px" />
					       </c:if>
					       <c:if test="${! empty userModel.headUrl}">
					         <img id="headImg" src="file/download?id=${userModel.headUrl }&sid=${userModel.sid}" width="165px" height="235px" />
					       </c:if>
							
						</div>
						<div class="file-box">
						  <input type="hidden" name="sourceType" id="sourceType" value="1">
						  <input type='text' name='filePathTem' id='filePathTem' style="height:22px; border:1px solid #cdcdcd; width:180px;" />  
						  <input type='button' style="background-color:#FFF; border:1px solid #CDCDCD;height:24px; width:70px;" value='浏览...' />
						  <input type="file" name="file" style="position:absolute; top:0; right:80px; height:24px; filter:alpha(opacity:0);opacity: 0;width:260px " id="file" size="28" 
						  		onchange="document.getElementById('filePathTem').value = this.value;" />
						  <input type="button"   onclick="user.uploadHeadImg();"style="background-color:#FFF; border:1px solid #CDCDCD;height:24px; width:70px;" value="上传" />
					    </div>
				   </form>
					<!--end content-->
				</div>
			</div>

<div class="clearfix"></div>
</div>